}
ops_push_clip (builder, &child_clip);
- g_assert (add_offscreen_ops (self, builder, &node->bounds,
- child,
- ®ion, &is_offscreen,
- FORCE_OFFSCREEN | RESET_OPACITY));
+ if (!add_offscreen_ops (self, builder, &node->bounds,
+ child,
+ ®ion, &is_offscreen,
+ FORCE_OFFSCREEN | RESET_OPACITY))
+ g_assert_not_reached ();
+
ops_pop_clip (builder);
ops_set_program (builder, &self->blit_program);
if (node_is_invisible (child))
return;
- g_assert (add_offscreen_ops (self, builder,
- &node->bounds,
- child,
- ®ion, &is_offscreen,
- RESET_CLIP | RESET_OPACITY));
+ if (!add_offscreen_ops (self, builder,
+ &node->bounds,
+ child,
+ ®ion, &is_offscreen,
+ RESET_CLIP | RESET_OPACITY))
+ g_assert_not_reached ();
ops_set_program (builder, &self->color_matrix_program);
ops_set_color_matrix (builder,
* (see gsk_blur_node_new), but we didn't have to do that if the blur
* shader could handle that situation. */
- g_assert (add_offscreen_ops (self, builder,
- &node->bounds,
- child,
- ®ion, &is_offscreen,
- RESET_CLIP | FORCE_OFFSCREEN | RESET_OPACITY));
+ if (!add_offscreen_ops (self, builder,
+ &node->bounds,
+ child,
+ ®ion, &is_offscreen,
+ RESET_CLIP | FORCE_OFFSCREEN | RESET_OPACITY))
+ g_assert_not_reached ();
ops_set_program (builder, &self->blur_program);
continue;
/* Draw the child offscreen, without the offset. */
- g_assert (add_offscreen_ops (self, builder,
- &shadow_child->bounds,
- shadow_child, ®ion, &is_offscreen,
- RESET_CLIP | RESET_OPACITY));
+ if (!add_offscreen_ops (self, builder,
+ &shadow_child->bounds,
+ shadow_child, ®ion, &is_offscreen,
+ RESET_CLIP | RESET_OPACITY))
+ g_assert_not_reached ();
ops_set_program (builder, &self->coloring_program);
ops_set_color (builder, &shadow->color);
/* TODO: We create 2 textures here as big as the cross-fade node, but both the
* start and the end node might be a lot smaller than that. */
- g_assert (add_offscreen_ops (self, builder,
- &node->bounds,
- start_node,
- &start_region, &is_offscreen1,
- FORCE_OFFSCREEN | RESET_CLIP | RESET_OPACITY));
+ if (!add_offscreen_ops (self, builder,
+ &node->bounds,
+ start_node,
+ &start_region, &is_offscreen1,
+ FORCE_OFFSCREEN | RESET_CLIP | RESET_OPACITY))
+ g_assert_not_reached ();
- g_assert (add_offscreen_ops (self, builder,
- &node->bounds,
- end_node,
- &end_region, &is_offscreen2,
- FORCE_OFFSCREEN | RESET_CLIP | RESET_OPACITY));
+ if (!add_offscreen_ops (self, builder,
+ &node->bounds,
+ end_node,
+ &end_region, &is_offscreen2,
+ FORCE_OFFSCREEN | RESET_CLIP | RESET_OPACITY))
+ g_assert_not_reached ();
ops_set_program (builder, &self->cross_fade_program);
/* TODO: We create 2 textures here as big as the blend node, but both the
* start and the end node might be a lot smaller than that. */
- g_assert (add_offscreen_ops (self, builder,
- &node->bounds,
- bottom_child,
- &bottom_region, &is_offscreen1,
- FORCE_OFFSCREEN | RESET_CLIP));
-
- g_assert (add_offscreen_ops (self, builder,
- &node->bounds,
- top_child,
- &top_region, &is_offscreen2,
- FORCE_OFFSCREEN | RESET_CLIP));
+ if (!add_offscreen_ops (self, builder,
+ &node->bounds,
+ bottom_child,
+ &bottom_region, &is_offscreen1,
+ FORCE_OFFSCREEN | RESET_CLIP))
+ g_assert_not_reached ();
+
+ if (!add_offscreen_ops (self, builder,
+ &node->bounds,
+ top_child,
+ &top_region, &is_offscreen2,
+ FORCE_OFFSCREEN | RESET_CLIP))
+ g_assert_not_reached ();
ops_set_program (builder, &self->blend_program);
ops_set_texture (builder, bottom_region.texture_id);
}
/* Draw the entire child on a texture */
- g_assert (add_offscreen_ops (self, builder,
- &child->bounds,
- child,
- ®ion, &is_offscreen,
- RESET_CLIP | RESET_OPACITY | FORCE_OFFSCREEN));
+ if (!add_offscreen_ops (self, builder,
+ &child->bounds,
+ child,
+ ®ion, &is_offscreen,
+ RESET_CLIP | RESET_OPACITY | FORCE_OFFSCREEN))
+ g_assert_not_reached ();
ops_set_program (builder, &self->repeat_program);
ops_set_texture (builder, region.texture_id);